import request from '@/config/axios'

export function useSubscribeApi() {
  return {
    getSubscribePage: async (params: any) => {
      return await request.get({url: '/yxt/subscribe/page', params})
    },
    pageList: async (data: any) => {
      return await request.post({url: '/yxt/subscribe/list', data})
    },
    subData: async (id: any) => {
      return await request.get({url: '/yxt/subscribe/subData?schoolId=' + id})
    },
    subListForMem: async (data: any) => {
      return await request.post({url: '/yxt/subscribe/getSubListForMem', data})
    },
    noPageList: async (data: any) => {
      return await request.get({url: '/yxt/subscribe/noPageList', data})
    },
    //练琴管理使用
    listNoPage: async (data: any) => {
      return await request.post({url: '/yxt/subscribe/listNoPage', data})
    },
    subListForMemNoPage: async (data: any) => {
      return await request.post({url: '/yxt/subscribe/getSubListForMemNoPage', data})
    },
    cancelBatch: async (data: any) => {
      return await request.post({url: '/yxt/subscribe/cancelBatch', data})
    },
    // 预约单远程开门
    remote: (data: any) => {
      return request.post({url: '/yxt/subscribe/door/remote', data})
    },
    // 获取今日预约单列表数据
    getTodaySubscribePage: async (params: any) => {
      return await request.get({url: '/yxt/subscribe/getTodaySubscribePage', params})
    },
    // 获取今日预约单列表无分页数据
    getTodaySubscribeNoPage: async (data: any) => {
      return await request.get({url: '/yxt/subscribe/getTodaySubscribeNoPage', data})
    }
  }
}
